package com.alibaba.lcc.utils.images;

import java.io.*;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;

public class demo1 {
    private static String URL = "http://33.90.146.6:9134/d/1002969$1$0$5/20190225/10/0941-2563438-0.jpg?streamID:72574@capTime:1551063187\n" +
            "http://172.29.218.34:8081/d/330109719920017160$1$0$0/20190225/10/0950-7398024-0.jpg?streamID:2147483647@capTime:1551061161\n" +
            "http://172.29.218.25:8081/d/1002642$1$0$0/20190225/10/0949-1120116-0.jpg?streamID:370132056@capTime:1551061545\n" +
            "http://33.90.146.29:9904/d/1001471$1$0$5/20190225/10/0947-77059859-0.jpg?streamID:40494@capTime:1551064695\n" +
            "http://33.90.146.6:9134/d/1002286$1$0$1/20190225/10/0948-2563469-0.jpg?streamID:60248@capTime:1551063189\n" +
            "http://33.90.146.6:9134/d/1002969$1$0$5/20190225/10/0944-2563396-0.jpg?streamID:72574@capTime:1551063186\n" +
            "http://172.29.218.36:8081/d/1002381$1$0$0/20190225/10/0940-3042778-0.jpg?streamID:290129367@capTime:1551059287\n" +
            "http://172.29.218.36:8081/d/1002481$1$0$0/20190225/10/0944-3042850-0.jpg?streamID:365131518@capTime:1551059291\n" +
            "http://33.90.146.29:9904/d/1000883$1$0$6/20190225/10/0938-77059702-0.jpg?streamID:46301@capTime:1551064686\n" +
            "http://172.29.218.25:8081/d/1002647$1$0$0/20190225/10/0947-1120078-0.jpg?streamID:370132061@capTime:1551061541\n" +
            "http://33.90.146.6:9134/d/1002788$1$0$1/20190225/10/0947-2563475-0.jpg?streamID:70334@capTime:1551063190\n" +
            "http://33.90.146.26:9901/d/1002592$1$0$1/20190225/10/0943-57090914-0.jpg?streamID:64940@capTime:1551062729\n" +
            "http://172.29.218.36:8081/d/1001351$1$0$0/20190225/10/0946-3042868-0.jpg?streamID:25088690@capTime:1551059292\n" +
            "http://172.29.218.25:8081/d/1002634$1$0$0/20190225/10/0945-1120080-0.jpg?streamID:370132048@capTime:1551061541\n" +
            "http://33.90.146.11:9139/d/1002059$1$0$3/20190225/10/0939-15992797-0.jpg?streamID:58464@capTime:1551063003\n" +
            "http://33.90.146.26:9901/d/1002687$1$0$4/20190225/10/0948-57090983-0.jpg?streamID:66937@capTime:1551062732\n" +
            "http://33.90.146.6:9134/d/1002405$1$0$2/20190225/10/0942-2563363-0.jpg?streamID:61501@capTime:1551063185\n" +
            "http://172.29.218.36:8081/d/1001358$1$0$0/20190225/10/0945-3042852-0.jpg?streamID:25088697@capTime:1551059291\n" +
            "http://33.90.146.31:9110/d/1002391$1$0$3/20190225/10/0941-10481987-0.jpg?streamID:61002@capTime:1551063911\n" +
            "http://33.90.146.6:9134/d/1002603$1$0$7/20190225/10/0943-2563375-0.jpg?streamID:65728@capTime:1551063186\n" +
            "http://33.90.146.12:9140/d/1002598$1$0$1/20190225/10/0940-17428054-0.jpg?streamID:64994@capTime:1551062583\n" +
            "http://172.29.218.36:8081/d/1002442$1$0$0/20190225/10/0949-3042926-0.jpg?streamID:360130833@capTime:1551059296\n" +
            "http://33.90.146.12:9140/d/1002598$1$0$4/20190225/10/0942-17428165-0.jpg?streamID:65003@capTime:1551062586\n" +
            "http://33.90.146.13:9141/d/1002577$1$0$0/20190225/10/0942-30069739-0.jpg?streamID:64053@capTime:1551064452\n" +
            "http://33.90.146.6:9134/d/1002779$1$0$7/20190225/10/0943-2563426-0.jpg?streamID:69998@capTime:1551063187\n" +
            "http://172.29.218.36:8081/d/1001352$1$0$0/20190225/10/0947-3042870-0.jpg?streamID:25088691@capTime:1551059293\n" +
            "http://172.29.218.25:8081/d/1002658$1$0$0/20190225/10/0945-1120082-0.jpg?streamID:370132076@capTime:1551061541\n" +
            "http://33.90.146.26:9901/d/1000879$1$0$1/20190225/10/0942-57090800-0.jpg?streamID:46358@capTime:1551062725\n" +
            "http://33.90.146.11:9139/d/1002054$1$0$2/20190225/10/0942-15992812-0.jpg?streamID:58349@capTime:1551063004\n" +
            "http://33.90.146.6:9134/d/1002783$1$0$3/20190225/10/0938-2563345-0.jpg?streamID:70166@capTime:1551063184\n" +
            "http://172.29.218.36:8081/d/1002362$1$0$0/20190225/10/0940-3042782-0.jpg?streamID:140124150@capTime:1551059287\n" +
            "http://172.29.218.36:8081/d/1002448$1$0$0/20190225/10/0945-3042854-0.jpg?streamID:360130839@capTime:1551059291\n" +
            "http://33.90.146.6:9134/d/1002788$1$0$4/20190225/10/0947-2563455-0.jpg?streamID:70337@capTime:1551063188\n" +
            "http://33.90.146.26:9901/d/1002667$1$0$3/20190225/10/0942-57090984-0.jpg?streamID:66456@capTime:1551062732\n" +
            "http://33.90.146.26:9901/d/1002687$1$0$3/20190225/10/0945-57090878-0.jpg?streamID:66936@capTime:1551062728\n" +
            "http://33.90.146.26:9901/d/1001013$1$0$2/20190225/10/0943-57090917-0.jpg?streamID:46503@capTime:1551062729\n" +
            "http://33.90.146.5:9133/d/1003086$1$0$0/20190225/10/0940-6871354-0.jpg?streamID:75713@capTime:1551091999\n" +
            "http://33.90.146.28:9903/d/1001651$1$0$4/20190225/10/0944-1860514-0.jpg?streamID:48657@capTime:1551061982\n" +
            "http://33.90.146.26:9901/d/1001003$1$0$1/20190225/10/0728-57090845-0.jpg?streamID:33812@capTime:1551062727\n" +
            "http://33.90.146.11:9139/d/1002086$1$0$2/20190225/10/0942-15992845-0.jpg?streamID:58981@capTime:1551063006\n" +
            "http://172.29.218.25:8081/d/1002632$1$0$0/20190225/10/0952-1120122-0.jpg?streamID:370132046@capTime:1551061546\n" +
            "http://172.29.218.36:8081/d/1001323$1$0$0/20190225/10/0834-3042856-0.jpg?streamID:25088662@capTime:1551059291\n" +
            "http://33.90.146.6:9134/d/1002405$1$0$2/20190225/10/0948-2563494-0.jpg?streamID:61501@capTime:1551063191\n" +
            "http://172.29.218.36:8081/d/1002438$1$0$0/20190225/10/0941-3042784-0.jpg?streamID:360130829@capTime:1551059288\n" +
            "http://172.29.218.25:8081/d/1002642$1$0$0/20190225/10/0950-1120124-0.jpg?streamID:370132056@capTime:1551061546\n" +
            "http://33.90.146.12:9140/d/1002047$1$0$7/20190225/10/0941-17428042-0.jpg?streamID:58172@capTime:1551062582\n" +
            "http://33.90.146.28:9903/d/1001539$1$0$2/20190225/10/0941-1860481-0.jpg?streamID:42055@capTime:1551061979\n" +
            "http://33.90.146.2:9130/d/1001724$1$0$1/20190225/10/0947-44352140-0.jpg?streamID:52084@capTime:1551092474\n" +
            "http://172.29.218.37:8081/d/1002118$1$0$0/20190225/10/0943-2766067-0.jpg?streamID:40103863@capTime:1551067127\n" +
            "http://33.90.146.29:9904/d/1001471$1$0$1/20190225/10/0941-77059784-0.jpg?streamID:40474@capTime:1551064690\n" +
            "http://172.29.218.34:8081/d/330109719920016160$1$0$0/20190225/10/0927-3593557-0.jpg?streamID:2147483647@capTime:1551061166\n" +
            "http://33.90.146.6:9134/d/1002788$1$0$4/20190225/10/0941-2563312-0.jpg?streamID:70337@capTime:1551063183\n" +
            "http://33.90.146.29:9904/d/1001471$1$0$5/20190225/10/0936-77059723-0.jpg?streamID:40494@capTime:1551064687\n" +
            "http://172.29.218.36:8081/d/1002446$1$0$0/20190225/10/0944-3042860-0.jpg?streamID:360130837@capTime:1551059291\n" +
            "http://33.90.146.31:9110/d/1001771$1$0$7/20190225/10/0940-10481963-0.jpg?streamID:53532@capTime:1551063910\n" +
            "http://33.90.146.28:9903/d/1002658$1$0$5/20190225/10/0942-1860493-0.jpg?streamID:66278@capTime:1551061980\n" +
            "http://172.29.218.36:8081/d/1001331$1$0$0/20190225/10/0951-3042932-0.jpg?streamID:25088670@capTime:1551059296\n" +
            "http://33.90.146.29:9904/d/1001764$1$0$0/20190225/10/0944-77059793-0.jpg?streamID:53073@capTime:1551064691\n" +
            "http://33.90.146.13:9141/d/1003129$1$0$4/20190225/10/0943-30069733-0.jpg?streamID:76977@capTime:1551064452\n" +
            "http://33.90.146.13:9141/d/1002432$1$0$0/20190225/10/0944-30069760-0.jpg?streamID:62061@capTime:1551064455\n" +
            "http://33.90.146.12:9140/d/1002050$1$0$3/20190225/10/0943-17428166-0.jpg?streamID:58200@capTime:1551062586\n" +
            "http://33.90.146.29:9904/d/1000883$1$0$2/20190225/10/0940-77059708-0.jpg?streamID:46297@capTime:1551064686\n" +
            "http://33.90.146.29:9904/d/1000883$1$0$3/20190225/10/0941-77059741-0.jpg?streamID:46298@capTime:1551064688\n" +
            "http://172.29.218.36:8081/d/1002432$1$0$0/20190225/10/0945-3042863-0.jpg?streamID:360130823@capTime:1551059292\n" +
            "http://172.29.218.36:8081/d/1001357$1$0$0/20190225/10/0951-3042934-0.jpg?streamID:25088696@capTime:1551059296\n" +
            "http://33.90.146.12:9140/d/1002597$1$0$1/20190225/10/0941-17428048-0.jpg?streamID:64974@capTime:1551062583\n" +
            "http://33.90.146.26:9901/d/1001003$1$0$1/20190225/10/0731-57090950-0.jpg?streamID:33812@capTime:1551062730\n" +
            "http://172.29.218.36:8081/d/1001567$1$0$1/20190225/10/0942-3042793-0.jpg?streamID:30096053@capTime:1551059288\n" +
            "http://33.90.146.12:9140/d/1002427$1$0$2/20190225/10/0943-17428117-0.jpg?streamID:61959@capTime:1551062585\n" +
            "http://33.90.146.11:9139/d/1002065$1$0$1/20190225/10/0949-15992927-0.jpg?streamID:58582@capTime:1551063011\n" +
            "http://33.90.146.5:9133/d/1002978$1$0$6/20190225/10/0945-6871405-0.jpg?streamID:72793@capTime:1551092003\n" +
            "http://33.90.146.29:9904/d/1001470$1$0$0/20190225/10/0947-77059841-0.jpg?streamID:40447@capTime:1551064695\n" +
            "http://33.90.146.29:9904/d/1001471$1$0$1/20190225/10/0937-77059759-0.jpg?streamID:40474@capTime:1551064688\n" +
            "http://172.29.218.36:8081/d/1001355$1$0$0/20190225/10/0947-3042878-0.jpg?streamID:25088694@capTime:1551059293\n" +
            "http://33.90.146.12:9140/d/1002427$1$0$2/20190225/10/0939-17428018-0.jpg?streamID:61959@capTime:1551062581\n" +
            "http://33.90.146.11:9139/d/1002072$1$0$3/20190225/10/0945-15992872-0.jpg?streamID:58672@capTime:1551063007\n" +
            "http://33.90.146.26:9901/d/1002687$1$0$3/20190225/10/0949-57090992-0.jpg?streamID:66936@capTime:1551062732\n" +
            "http://172.29.218.37:8081/d/1002060$1$0$0/20190225/10/0941-2766075-0.jpg?streamID:40103805@capTime:1551067128\n" +
            "http://172.29.218.36:8081/d/1002419$1$0$0/20190225/10/0942-3042795-0.jpg?streamID:360130802@capTime:1551059289\n" +
            "http://33.90.146.28:9903/d/1002658$1$0$7/20190225/10/0945-1860521-0.jpg?streamID:66280@capTime:1551061983\n" +
            "http://33.90.146.5:9133/d/1001885$1$0$0/20190225/10/0945-6871421-0.jpg?streamID:56147@capTime:1551092004\n" +
            "http://33.90.146.26:9901/d/1002592$1$0$2/20190225/10/0940-57090773-0.jpg?streamID:64941@capTime:1551062724\n" +
            "http://33.90.146.6:9134/d/1002783$1$0$3/20190225/10/0947-2563463-0.jpg?streamID:70166@capTime:1551063189\n" +
            "http://172.29.218.34:8081/d/330109609920011460$1$0$0/20190225/10/0945-7398009-0.jpg?streamID:2147483647@capTime:1551061163\n" +
            "http://33.90.146.31:9110/d/1001771$1$0$7/20190225/10/0942-10482008-0.jpg?streamID:53532@capTime:1551063913\n" +
            "http://33.90.146.26:9901/d/1000879$1$0$2/20190225/10/0942-57090824-0.jpg?streamID:46359@capTime:1551062726\n" +
            "http://172.29.218.36:8081/d/1001351$1$0$0/20190225/10/0943-3042797-0.jpg?streamID:25088690@capTime:1551059289\n" +
            "http://33.90.146.11:9139/d/1002057$1$0$0/20190225/10/0941-15992836-0.jpg?streamID:58425@capTime:1551063006\n" +
            "http://172.29.218.37:8081/d/1002041$1$0$0/20190225/10/0944-2766079-0.jpg?streamID:40103786@capTime:1551067128\n" +
            "http://33.90.146.5:9133/d/1001862$1$0$2/20190225/10/0943-6871384-0.jpg?streamID:55802@capTime:1551092001\n" +
            "http://33.90.146.12:9140/d/1002664$1$0$0/20190225/10/0941-17428067-0.jpg?streamID:66427@capTime:1551062583\n" +
            "http://172.29.218.36:8081/d/1001330$1$0$0/20190225/10/0947-3042882-0.jpg?streamID:25088669@capTime:1551059293\n" +
            "http://172.29.218.34:8081/d/330109609920020460$1$0$0/20190225/10/0946-7398014-0.jpg?streamID:2147483647@capTime:1551061163\n" +
            "http://33.90.146.26:9901/d/1002688$1$0$3/20190225/10/0941-57090774-0.jpg?streamID:66948@capTime:1551062724\n" +
            "http://172.29.218.37:8081/d/1002148$1$0$0/20190225/10/0943-2766081-0.jpg?streamID:40103893@capTime:1551067129\n" +
            "http://33.90.146.13:9141/d/1002577$1$0$2/20190225/10/0945-30069757-0.jpg?streamID:64055@capTime:1551064455\n" +
            "http://33.90.146.31:9110/d/1001036$1$0$0/20190225/10/0949-10482054-0.jpg?streamID:46361@capTime:1551063918\n" +
            "http://33.90.146.29:9904/d/1001010$1$0$1/20190225/10/0941-77059711-0.jpg?streamID:46446@capTime:1551064686\n" +
            "http://33.90.146.26:9901/d/1001013$1$0$1/20190225/10/0938-57090779-0.jpg?streamID:46498@capTime:1551062724\n" +
            "http://33.90.146.6:9134/d/1003096$1$0$2/20190225/10/0944-2563399-0.jpg?streamID:76095@capTime:1551063186\n" +
            "http://172.29.218.36:8081/d/1002476$1$0$0/20190225/10/0950-3042942-0.jpg?streamID:365131513@capTime:1551059297\n" +
            "http://33.90.146.5:9133/d/1002411$1$0$0/20190225/10/0945-6871399-0.jpg?streamID:61613@capTime:1551092003\n" +
            "http://33.90.146.26:9901/d/1000879$1$0$0/20190225/10/0942-57090815-0.jpg?streamID:46357@capTime:1551062726\n" +
            "http://172.29.218.36:8081/d/1001316$1$0$0/20190225/10/0947-3042884-0.jpg?streamID:25088655@capTime:1551059293\n" +
            "http://33.90.146.11:9139/d/1002085$1$0$0/20190225/10/0941-15992788-0.jpg?streamID:58949@capTime:1551063003\n" +
            "http://172.29.218.36:8081/d/1001567$1$0$0/20190225/10/0943-3042804-0.jpg?streamID:30096048@capTime:1551059289\n" +
            "http://33.90.146.5:9133/d/1002978$1$0$3/20190225/10/0948-6871451-0.jpg?streamID:72784@capTime:1551092007\n" +
            "http://172.29.218.37:8081/d/1001972$1$0$0/20190225/10/0945-2766083-0.jpg?streamID:40103717@capTime:1551067129\n" +
            "http://172.29.218.37:8081/d/1001916$1$0$0/20190225/10/0944-2766085-0.jpg?streamID:40103661@capTime:1551067130\n" +
            "http://33.90.146.5:9133/d/1003086$1$0$4/20190225/10/0943-6871393-0.jpg?streamID:75723@capTime:1551092002\n" +
            "http://33.90.146.31:9110/d/1001772$1$0$0/20190225/10/0945-10482035-0.jpg?streamID:53533@capTime:1551063915\n" +
            "http://33.90.146.12:9140/d/1002076$1$0$2/20190225/10/0943-17428150-0.jpg?streamID:58752@capTime:1551062586\n" +
            "http://33.90.146.26:9901/d/1002688$1$0$4/20190225/10/0943-57090806-0.jpg?streamID:66949@capTime:1551062725\n" +
            "http://33.90.146.29:9904/d/1002622$1$0$0/20190225/10/0740-77059696-0.jpg?streamID:65939@capTime:1551064686\n" +
            "http://172.29.218.36:8081/d/1001357$1$0$0/20190225/10/0944-3042806-0.jpg?streamID:25088696@capTime:1551059289\n" +
            "http://33.90.146.13:9141/d/1003129$1$0$4/20190225/10/0942-30069718-0.jpg?streamID:76977@capTime:1551064451\n" +
            "http://33.90.146.5:9133/d/1001820$1$0$0/20190225/10/0945-6871415-0.jpg?streamID:54889@capTime:1551092004\n" +
            "http://172.29.218.25:8081/d/1002632$1$0$0/20190225/10/0943-1120047-0.jpg?streamID:370132046@capTime:1551061537\n" +
            "http://33.90.146.12:9140/d/1002598$1$0$5/20190225/10/0941-17428036-0.jpg?streamID:65004@capTime:1551062582\n" +
            "http://172.29.218.37:8081/d/1002117$1$0$0/20190225/10/0945-2766088-0.jpg?streamID:40103862@capTime:1551067130\n" +
            "http://172.29.218.36:8081/d/1002447$1$0$0/20190225/10/0942-3042808-0.jpg?streamID:360130838@capTime:1551059289\n" +
            "http://172.29.218.37:8081/d/1002073$1$0$0/20190225/10/0947-2766122-0.jpg?streamID:40103818@capTime:1551067133\n" +
            "http://33.90.146.26:9901/d/1001004$1$0$0/20190225/10/0930-57090869-0.jpg?streamID:33817@capTime:1551062727\n" +
            "http://33.90.146.12:9140/d/1002047$1$0$3/20190225/10/0940-17428030-0.jpg?streamID:58162@capTime:1551062582\n" +
            "http://172.29.218.37:8081/d/1002079$1$0$0/20190225/10/0944-2766090-0.jpg?streamID:40103824@capTime:1551067130\n" +
            "http://33.90.146.13:9141/d/1002577$1$0$1/20190225/10/0943-30069742-0.jpg?streamID:64054@capTime:1551064453\n" +
            "http://33.90.146.6:9134/d/1002603$1$0$3/20190225/10/0940-2563304-0.jpg?streamID:65700@capTime:1551063182\n" +
            "http://33.90.146.12:9140/d/1001468$1$0$0/20190225/10/1100-17428153-0.jpg?streamID:46776@capTime:1551062586\n" +
            "http://33.90.146.29:9904/d/1001471$1$0$1/20190225/10/0948-77059862-0.jpg?streamID:40474@capTime:1551064695\n" +
            "http://33.90.146.12:9140/d/1002047$1$0$5/20190225/10/0942-17428066-0.jpg?streamID:58170@capTime:1551062583\n" +
            "http://172.29.218.36:8081/d/1001350$1$0$0/20190225/10/0944-3042812-0.jpg?streamID:25088689@capTime:1551059289\n" +
            "http://172.29.218.37:8081/d/1002075$1$0$0/20190225/10/0948-2766130-0.jpg?streamID:40103820@capTime:1551067134\n" +
            "http://33.90.146.26:9901/d/1002592$1$0$3/20190225/10/0942-57090863-0.jpg?streamID:64942@capTime:1551062727\n" +
            "http://33.90.146.26:9901/d/1002688$1$0$4/20190225/10/0946-57090920-0.jpg?streamID:66949@capTime:1551062729\n" +
            "http://33.90.146.29:9904/d/1000779$1$0$1/20190225/10/0944-77059790-0.jpg?streamID:23112@capTime:1551064691\n" +
            "http://172.29.218.37:8081/d/1002078$1$0$0/20190225/10/0959-2766250-0.jpg?streamID:40103823@capTime:1551067145\n" +
            "http://33.90.146.28:9903/d/1001651$1$0$4/20190225/10/0953-1860570-0.jpg?streamID:48657@capTime:1551061991\n" +
            "http://33.90.146.5:9133/d/1002784$1$0$3/20190225/10/0956-6871550-0.jpg?streamID:70208@capTime:1551092014\n" +
            "http://172.29.218.25:8081/d/1002647$1$0$0/20190225/10/1000-1120204-0.jpg?streamID:370132061@capTime:1551061554\n" +
            "http://172.29.218.25:8081/d/1002647$1$0$0/20190225/10/0956-1120170-0.jpg?streamID:370132061@capTime:1551061551\n" +
            "http://172.29.218.36:8081/d/1001310$1$0$0/20190225/10/0955-3043007-0.jpg?streamID:25088649@capTime:1551059301\n" +
            "http://172.29.218.25:8081/d/1002647$1$0$0/20190225/10/1001-1120206-0.jpg?streamID:370132061@capTime:1551061555\n" +
            "http://172.29.218.36:8081/d/1001320$1$0$0/20190225/10/0905-3043070-0.jpg?streamID:25088659@capTime:1551059306\n" +
            "http://172.29.218.34:8081/d/330109719920017160$1$0$0/20190225/10/0953-7398036-0.jpg?streamID:2147483647@capTime:1551061166\n" +
            "http://33.90.146.11:9139/d/1002057$1$0$2/20190225/10/0950-15992969-0.jpg?streamID:58433@capTime:1551063015\n" +
            "http://172.29.218.37:8081/d/1002077$1$0$0/20190225/10/0959-2766253-0.jpg?streamID:40103822@capTime:1551067145\n" +
            "http://33.90.146.26:9901/d/1002688$1$0$2/20190225/10/0952-57091028-0.jpg?streamID:66947@capTime:1551062734\n" +
            "http://33.90.146.3:9131/d/1002451$1$0$1/20190225/10/0951-28269906-0.jpg?streamID:62340@capTime:1551092520\n" +
            "http://33.90.146.11:9139/d/1002389$1$0$0/20190225/10/0954-15993005-0.jpg?streamID:60933@capTime:1551063016\n" +
            "http://33.90.146.13:9141/d/1002439$1$0$0/20190225/10/0945-30069787-0.jpg?streamID:62153@capTime:1551064460";
    public static void main(String[] args) {
        List<String> list = Arrays.asList(URL.split("\n"));
        AtomicInteger i = new AtomicInteger();
        list.stream().forEach(str -> {
            System.out.println(i.getAndIncrement());
            String path="/Users/setsun/Desktop/pic/"+(1+Math.random()*1000)+System.currentTimeMillis()+".jpg";
            System.out.println(str+"__"+path);
            downloadPicture(str,path);
        });
//        String url = "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1556450200,4169894330&fm=11&gp=0.jpg";
//        String path="/Users/setsun/Desktop/pic/pic.jpg";
//        downloadPicture(url,path);



    }
    //链接url下载图片
    private static void downloadPicture(String urlList,String path) {
        URL url = null;
        try {
            url = new URL(urlList);
            DataInputStream dataInputStream = new DataInputStream(url.openStream());

            FileOutputStream fileOutputStream = new FileOutputStream(new File(path));
            ByteArrayOutputStream output = new ByteArrayOutputStream();

            byte[] buffer = new byte[1024];
            int length;

            while ((length = dataInputStream.read(buffer)) > 0) {
                output.write(buffer, 0, length);
            }
            fileOutputStream.write(output.toByteArray());
            dataInputStream.close();
            fileOutputStream.close();
        } catch (MalformedURLException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
